import React, { useState } from 'react'
import { CarryOutOutlined, CheckOutlined, FormOutlined } from '@ant-design/icons';
import { Select, Switch, Tree } from 'antd';
import type { TreeDataNode } from 'antd';
import {iconType} from './iconType'
const treeData: TreeDataNode[] = [
    {
        title: 'parent 1',
        key: '0-0',
        icon: 'CarryOutOutlined',
    }
];
export default function index() {
    const [newTreeDataList, setNewTreeDataList] = useState(treeData);


    newTreeDataList.map((item, index) => {
         item.icon = iconType('h1');
    })
    return (
        <div>
            tree
            <Tree
                showLine
                showIcon
                defaultExpandedKeys={['0-0-0']}
                // onSelect={onSelect}
                treeData={treeData}
            />
        </div>
    )
}
